<?php

namespace app\utils;

use think\facade\Db;

class Custom
{
    public static function get_file($route)
    {
        $list = Db::table('site_custom_page')->where('route', $route)->select()->toArray();
        if (count($list) == 0) {
            //无路由
            return false;
        } else {
            return $list[0]['file'];
        }
    }

    public static function get_files()
    {
        $list = Db::table('site_custom_page')->select()->toArray();
        if (count($list) == 0) {
            //无路由
            return false;
        } else {
            return $list;
        }
    }
}
